package com.beerq.util;

import android.content.Context;

/**
 * 作者：minj on 2016/4/21 16:53
 * SharePrefence 的操作类
 */
public class BeerQPref extends BasePref {

    public static final String wechat_token="WECHATTOKEN";
    public static final String user_info="USERINFO";

    private  BeerQPref() {

//        mSharedPref=    context.getSharedPreferences("beerqEEPref", Context.MODE_PRIVATE);
    }

    public static  BeerQPref getInstance(Context context){
        mSharedPref=context.getSharedPreferences("BeerQPref", Context.MODE_PRIVATE);
        return new BeerQPref();
    }

    public void setWeChatToken(String token){
        putStringKey(wechat_token,token);
    }

    public String getWechatToken(){
       return  getStringKey(wechat_token);
    }

    public void setUserInfo(String str){
        putStringKey(user_info,str);
    }

    public String getUserInfo(){
        return  getStringKey(user_info);
    }

    public void setIsShowAlarm(boolean b){
        putBooleanKey("ALARM",b);
    }

    public boolean isShowAlarm(){
        return  getBooleanKey("ALARM");
    }

}
